﻿Imports System.Runtime.CompilerServices
Imports DotNetNuke.Common.Lists
Imports Microsoft.VisualBasic

Namespace effority.UserDirectory

    Public Module ExtensionMethods

        <Extension()> _
        Public Function IsList(ByVal PropertyDefinition As DotNetNuke.Entities.Profile.ProfilePropertyDefinition) As Boolean
            Dim objListController As New ListController
            Dim dataType As ListEntryInfo = objListController.GetListEntryInfo(PropertyDefinition.DataType)
            If (Not dataType Is Nothing) AndAlso (dataType.ListName = "DataType") AndAlso (dataType.Value = "List") Then
                Return True
            Else
                Return False
            End If
        End Function

    End Module
End Namespace